/*
 * @Author: Admin zhaojihai2012@163.com
 * @Date: 2024-01-29 11:31:48
 * @LastEditors: Admin zhaojihai2012@163.com
 * @LastEditTime: 2024-01-31 13:22:11
 * @FilePath: \kd686-esp32s3-can\components\kd686bsp\ec_bsp_pwm.h
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

/**
 * @brief 背光驱动函数
 * 
 */
#ifndef __EC_BSP_PWM_H_
#define __EC_BSP_PWM_H_


#include "driver/ledc.h"

#define PWM_IO_NUM      46

#define LEDC_TIMER              LEDC_TIMER_0
#define LEDC_MODE               LEDC_LOW_SPEED_MODE
// #define LEDC_OUTPUT_IO          I80_PIN_NUM_BK_LIGHT // Define the output GPIO
#define LEDC_CHANNEL            LEDC_CHANNEL_4
#define LEDC_DUTY_RES           LEDC_TIMER_8_BIT 
#define LEDC_FREQUENCY          (1000) // Frequency in Hertz. Set frequency at 1 kHz

                                    //20% 40%  60% 80%  100%  auto
static uint8_t lcd_duty_array[6] =  {0,10,30,50,75,100};




void ec_bsp_pwm_init(void);
uint8_t ec_bsp_set_bl(uint8_t bl);

#endif
